---
title: Get Started with openstatus CLI
---

import { Image } from 'astro:assets';
import CLI from '../../../assets/tutorial/get-started-with-openstatus-cli/CLI.png';

<Image
  src={CLI}
  alt="openstatus CLI"
/>

## Installation


Install the OpenStatus CLI to set up your monitors straight in your code.

### OS X
```bash
brew install openstatusHQ/cli/openstatus --cask
```
or

```bash
curl -sSL instl.sh/openstatushq/cli/macos | bash
```

### Linux
```bash
curl -sSL instl.sh/openstatushq/cli/linux | bash
```

### Windows

```bash
iwr instl.sh/openstatushq/cli/windows | iex
```

## Add API Key

Create an API key in your workspace settings.

```bash
export OPENSTATUS_API_TOKEN=<your-api-token>
```

## Import Monitors

Import monitors from your workspace to a YAML file.

```bash
openstatus monitors import
```

### Manage Monitors

Add, remove, or update monitors from a YAML file and apply your changes.

```bash
openstatus monitors apply
```
